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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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