class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.u: D = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: C = None
        self.o: A = 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.x: B = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.z: C = None
        self.x: A = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

k = A("k")
j = B("j")
m = C("m")
h = D("h")
i = E("i")
c = F("c")
d = A("d")
l = F("l")
g = D("g")

k.v = c
k.t = m
k.u = g
k.r = g
k.x = i
j.v = m
j.p = m
j.t = h
j.o = k
m.t = k
h.x = j
h.p = g
h.s = c
i.u = j
i.v = j
i.z = m
i.x = k
i.r = k
i.t = k
c.v = d
c.z = j
c.p = m
d.v = l
d.t = m
d.u = g
d.r = g
d.x = i
l.v = d
l.z = j
l.p = m
g.x = j
g.p = h
g.s = l
assert l.z.o.v.v.v.z.t.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.u: D = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.p: C = None
        self.o: A = 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.x: B = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.z: C = None
        self.x: A = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

k = A("k")
j = B("j")
m = C("m")
h = D("h")
i = E("i")
c = F("c")
d = A("d")
l = F("l")
g = D("g")

k.v = c
k.t = m
k.u = g
k.r = g
k.x = i
j.v = m
j.p = m
j.t = h
j.o = k
m.t = k
h.x = j
h.p = g
h.s = c
i.u = j
i.v = j
i.z = m
i.x = k
i.r = k
i.t = k
c.v = d
c.z = j
c.p = m
d.v = l
d.t = m
d.u = g
d.r = g
d.x = i
l.v = d
l.z = j
l.p = m
g.x = j
g.p = h
g.s = l
assert l.z.o.v.v.v.z.t.s.p.txt == "m"