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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.p: D = None
        self.u: F = None
        self.r: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.t: A = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.t: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.p: D = None
        self.u: F = None
        self.r: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.t: A = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.t: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

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

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