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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.t: E = None
        self.v: G = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.y: A = None
        self.txt = txt

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

g.t = d
g.w = a
g.z = a
g.v = k
g.p = j
j.u = d
j.v = d
j.o = d
j.y = d
j.p = g
j.t = a
k.q = i
k.y = d
k.o = f
b.q = d
b.t = g
a.z = f
a.w = k
a.r = d
a.v = d
i.q = j
i.o = j
d.w = g
d.y = g
d.q = k
f.q = j
f.o = j
assert k.q.q.p.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: E = None
        self.v: C = None
        self.p: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.t: E = None
        self.v: G = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.y: A = None
        self.txt = txt

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

g.t = d
g.w = a
g.z = a
g.v = k
g.p = j
j.u = d
j.v = d
j.o = d
j.y = d
j.p = g
j.t = a
k.q = i
k.y = d
k.o = f
b.q = d
b.t = g
a.z = f
a.w = k
a.r = d
a.v = d
i.q = j
i.o = j
d.w = g
d.y = g
d.q = k
f.q = j
f.o = j
assert k.q.q.p.v.q.txt == "i"