class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.p: D = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.p: D = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

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

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