class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.p: A = None
        self.r: E = None
        self.v: F = None
        self.y: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.y: H = None
        self.w: A = None
        self.v: A = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

i = A("i")
d = B("d")
l = C("l")
n = D("n")
g = E("g")
m = F("m")
c = G("c")
b = H("b")
f = D("f")
a = D("a")

i.o = m
i.s = m
i.w = g
d.x = i
d.p = i
d.w = n
d.r = g
d.y = g
d.v = m
d.q = m
l.s = i
n.z = f
n.o = c
g.o = b
g.y = b
g.q = m
g.w = i
g.v = i
g.t = l
g.z = l
m.v = c
m.y = i
c.x = i
b.z = d
b.x = g
b.v = l
f.z = n
f.o = c
a.z = f
a.o = c
assert b.x.t.s.o.v.x.s.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.p: A = None
        self.r: E = None
        self.v: F = None
        self.y: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.y: H = None
        self.w: A = None
        self.v: A = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

i = A("i")
d = B("d")
l = C("l")
n = D("n")
g = E("g")
m = F("m")
c = G("c")
b = H("b")
f = D("f")
a = D("a")

i.o = m
i.s = m
i.w = g
d.x = i
d.p = i
d.w = n
d.r = g
d.y = g
d.v = m
d.q = m
l.s = i
n.z = f
n.o = c
g.o = b
g.y = b
g.q = m
g.w = i
g.v = i
g.t = l
g.z = l
m.v = c
m.y = i
c.x = i
b.z = d
b.x = g
b.v = l
f.z = n
f.o = c
a.z = f
a.o = c
assert b.x.t.s.o.v.x.s.v.x.txt == "i"