class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.u: E = None
        self.s: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.s: D = None
        self.u: B = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.s: D = None
        self.u: B = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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