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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.p: D = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.x: A = None
        self.y: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.p: D = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.x: A = None
        self.y: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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