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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.u: C = None
        self.txt = txt

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

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