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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.q: F = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.q: F = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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