class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.y: D = None
        self.o: D = None
        self.s: B = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

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

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