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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.q: F = None
        self.s: B = None
        self.y: F = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.q: F = None
        self.s: B = None
        self.y: F = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

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

f.u = h
f.q = n
f.t = n
f.o = g
f.s = c
b.x = n
d.r = f
d.o = f
d.v = n
n.z = c
n.x = c
g.t = d
g.u = f
g.q = h
g.y = h
g.s = b
g.r = a
g.p = c
h.o = f
h.q = f
h.s = b
h.z = n
h.t = n
h.v = c
h.u = g
c.v = b
c.w = a
c.u = a
a.t = d
a.u = f
a.q = h
a.y = h
a.s = b
a.r = g
a.p = c
assert b.x.x.u.s.x.x.v.x.txt == "n"