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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.s: D = None
        self.u: G = None
        self.q: F = None
        self.x: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.t: C = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.s: D = None
        self.u: G = None
        self.q: F = None
        self.x: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.t: C = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

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

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

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