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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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