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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.z: H = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.z: H = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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