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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: G = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.x: D = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: G = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: D = None
        self.x: D = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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