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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

c.v = a
c.z = a
c.r = l
c.u = f
j.o = h
j.z = f
j.x = c
a.u = e
a.p = l
a.s = c
h.s = g
h.q = f
h.t = k
f.t = a
f.z = l
l.t = j
l.s = e
e.s = c
e.q = f
e.t = k
g.v = a
g.z = a
g.r = l
g.u = f
k.s = g
k.q = f
k.t = h
assert e.t.s.z.txt == "a"