class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: G = None
        self.s: D = None
        self.t: E = None
        self.u: F = None
        self.v: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.y: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.u: C = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.s: B = None
        self.w: C = None
        self.x: A = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.z: H = None
        self.x: G = None
        self.u: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.s: B = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

i = A("i")
g = B("g")
f = C("f")
b = D("b")
m = E("m")
c = F("c")
e = G("e")
j = H("j")
a = C("a")

i.o = g
i.z = g
i.y = g
i.x = e
i.v = e
i.s = b
i.t = m
i.u = c
g.w = e
g.p = a
g.y = m
g.z = i
g.t = b
f.t = g
f.v = a
f.u = a
f.q = c
b.o = j
b.y = i
b.x = i
b.s = g
b.z = g
b.t = g
b.w = a
m.v = b
m.y = g
c.o = b
c.w = e
c.x = e
c.y = e
c.z = j
c.u = f
e.x = j
j.t = c
j.w = g
j.s = g
j.u = g
j.q = f
a.t = g
a.v = f
a.u = f
a.q = c
assert b.o.w.t.o.t.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: G = None
        self.s: D = None
        self.t: E = None
        self.u: F = None
        self.v: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.y: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.u: C = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.s: B = None
        self.w: C = None
        self.x: A = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.z: H = None
        self.x: G = None
        self.u: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.s: B = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

i = A("i")
g = B("g")
f = C("f")
b = D("b")
m = E("m")
c = F("c")
e = G("e")
j = H("j")
a = C("a")

i.o = g
i.z = g
i.y = g
i.x = e
i.v = e
i.s = b
i.t = m
i.u = c
g.w = e
g.p = a
g.y = m
g.z = i
g.t = b
f.t = g
f.v = a
f.u = a
f.q = c
b.o = j
b.y = i
b.x = i
b.s = g
b.z = g
b.t = g
b.w = a
m.v = b
m.y = g
c.o = b
c.w = e
c.x = e
c.y = e
c.z = j
c.u = f
e.x = j
j.t = c
j.w = g
j.s = g
j.u = g
j.q = f
a.t = g
a.v = f
a.u = f
a.q = c
assert b.o.w.t.o.t.x.x.txt == "j"