class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: I = None
        self.q: G = None
        self.s: A = None
        self.r: D = None
        self.z: F = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: H = None
        self.x: H = None
        self.y: G = None
        self.v: B = None
        self.u: G = None
        self.t: I = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: C = None
        self.r: F = None
        self.z: C = None
        self.u: I = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: I = None
        self.q: G = None
        self.s: A = None
        self.r: D = None
        self.z: F = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: H = None
        self.x: H = None
        self.y: G = None
        self.v: B = None
        self.u: G = None
        self.t: I = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: C = None
        self.r: F = None
        self.z: C = None
        self.u: I = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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