class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.s: C = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: A = None
        self.y: A = None
        self.v: C = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

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

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

a = A("a")
e = B("e")
j = C("j")
l = D("l")
n = E("n")
i = F("i")
h = D("h")
g = B("g")
c = C("c")

a.t = h
a.x = n
a.s = j
a.p = e
a.z = l
e.v = i
e.r = i
e.y = l
j.u = n
j.y = a
j.x = i
l.x = a
l.z = a
l.y = a
l.v = c
l.p = e
l.u = e
n.z = c
i.o = n
h.x = a
h.z = a
h.y = a
h.v = j
h.p = g
h.u = g
g.v = i
g.r = i
g.y = h
c.u = n
c.y = a
c.x = i
assert l.z.z.v.x.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.s: C = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: A = None
        self.y: A = None
        self.v: C = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

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

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

a = A("a")
e = B("e")
j = C("j")
l = D("l")
n = E("n")
i = F("i")
h = D("h")
g = B("g")
c = C("c")

a.t = h
a.x = n
a.s = j
a.p = e
a.z = l
e.v = i
e.r = i
e.y = l
j.u = n
j.y = a
j.x = i
l.x = a
l.z = a
l.y = a
l.v = c
l.p = e
l.u = e
n.z = c
i.o = n
h.x = a
h.z = a
h.y = a
h.v = j
h.p = g
h.u = g
g.v = i
g.r = i
g.y = h
c.u = n
c.y = a
c.x = i
assert l.z.z.v.x.o.z.txt == "c"