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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
h = C("h")
b = D("b")
n = E("n")
l = F("l")
m = G("m")
g = D("g")
f = G("f")

e.x = j
j.v = l
j.r = h
j.u = n
j.s = f
j.z = f
j.q = m
h.x = l
b.v = j
b.s = m
n.t = b
n.w = b
n.u = b
l.x = g
l.t = b
m.s = l
m.o = f
m.w = h
m.p = h
g.v = j
g.s = m
f.s = l
f.o = m
f.w = h
f.p = h
assert n.u.v.s.o.o.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
h = C("h")
b = D("b")
n = E("n")
l = F("l")
m = G("m")
g = D("g")
f = G("f")

e.x = j
j.v = l
j.r = h
j.u = n
j.s = f
j.z = f
j.q = m
h.x = l
b.v = j
b.s = m
n.t = b
n.w = b
n.u = b
l.x = g
l.t = b
m.s = l
m.o = f
m.w = h
m.p = h
g.v = j
g.s = m
f.s = l
f.o = m
f.w = h
f.p = h
assert n.u.v.s.o.o.s.x.txt == "g"