class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.q: C = None
        self.s: H = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.w: A = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.txt = txt

b = A("b")
e = B("e")
a = C("a")
k = D("k")
m = E("m")
l = F("l")
i = G("i")
n = H("n")
j = D("j")

b.t = m
b.o = m
b.r = a
b.q = a
b.s = n
b.z = l
e.r = i
e.w = i
e.u = i
e.s = a
e.x = b
e.t = n
e.q = n
a.o = i
k.u = m
k.z = n
k.w = b
k.y = b
k.x = i
m.r = a
m.u = j
m.p = n
l.x = b
i.x = a
i.s = a
n.r = l
n.p = k
j.u = m
j.z = n
j.w = b
j.y = b
j.x = i
assert l.x.t.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.q: C = None
        self.s: H = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.w: A = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: D = None
        self.txt = txt

b = A("b")
e = B("e")
a = C("a")
k = D("k")
m = E("m")
l = F("l")
i = G("i")
n = H("n")
j = D("j")

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