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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.y: E = None
        self.o: F = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: C = None
        self.r: B = None
        self.t: E = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.y: E = None
        self.o: F = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: C = None
        self.r: B = None
        self.t: E = None
        self.u: D = None
        self.s: B = None
        self.txt = txt

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

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

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