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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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