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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.y: A = None
        self.r: A = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.x: E = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.y: A = None
        self.r: A = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

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

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