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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.r: A = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.u: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.r: A = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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