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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: D = None
        self.p: A = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.r: F = None
        self.o: B = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: D = None
        self.p: A = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: D = None
        self.r: F = None
        self.o: B = None
        self.t: D = None
        self.w: C = None
        self.txt = txt

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

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