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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.r: B = None
        self.u: C = None
        self.t: H = None
        self.s: H = None
        self.z: F = None
        self.p: I = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: B = None
        self.t: B = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.txt = txt

l = A("l")
c = B("c")
f = C("f")
d = D("d")
k = E("k")
m = F("m")
g = G("g")
e = H("e")
b = I("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.r: B = None
        self.u: C = None
        self.t: H = None
        self.s: H = None
        self.z: F = None
        self.p: I = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: B = None
        self.t: B = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.txt = txt

l = A("l")
c = B("c")
f = C("f")
d = D("d")
k = E("k")
m = F("m")
g = G("g")
e = H("e")
b = I("b")

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