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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.x: A = None
        self.q: A = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: A = None
        self.y: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: C = None
        self.z: F = None
        self.r: A = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.x: A = None
        self.q: A = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: A = None
        self.y: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: C = None
        self.z: F = None
        self.r: A = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

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

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

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