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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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