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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.s: A = None
        self.u: B = None
        self.q: A = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.q: E = None
        self.p: A = None
        self.t: E = None
        self.o: B = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: B = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.s: A = None
        self.u: B = None
        self.q: A = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.q: E = None
        self.p: A = None
        self.t: E = None
        self.o: B = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: B = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

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