class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.v: D = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.p: G = None
        self.v: C = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: A = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.t: G = None
        self.u: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: G = None
        self.p: G = None
        self.v: C = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: A = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.t: G = None
        self.u: E = None
        self.r: E = None
        self.q: F = None
        self.txt = txt

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

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

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