class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.x: C = None
        self.p: E = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: G = None
        self.q: G = None
        self.z: F = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.x: D = None
        self.t: C = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.x: C = None
        self.p: E = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: D = None
        self.r: G = None
        self.q: G = None
        self.z: F = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.x: D = None
        self.t: C = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

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

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

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