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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: F = None
        self.r: B = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.q: E = None
        self.y: F = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.txt = txt

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

b.x = n
d.w = i
d.p = i
d.u = n
d.s = g
i.q = d
i.r = d
i.y = d
i.p = d
i.o = g
c.t = j
m.t = c
m.w = g
m.y = g
m.q = j
m.u = i
m.p = b
g.u = c
g.z = c
g.s = m
e.r = m
e.o = j
n.z = i
n.p = i
j.t = c
j.w = g
j.y = g
j.q = m
j.u = i
j.p = b
assert b.x.z.o.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: F = None
        self.r: B = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.q: E = None
        self.y: F = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.txt = txt

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

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