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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.o: B = None
        self.v: B = None
        self.r: G = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.o: B = None
        self.v: B = None
        self.r: G = None
        self.y: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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