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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.w: A = None
        self.r: C = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

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

d = A("d")
c = B("c")
n = C("n")
l = D("l")
e = E("e")
k = F("k")

d.y = c
d.o = c
d.u = n
d.x = n
d.v = k
c.r = n
c.u = n
c.z = d
c.t = k
n.t = k
n.v = k
n.r = l
n.x = c
l.y = d
l.o = d
l.q = k
e.z = d
e.w = d
e.t = d
e.p = k
e.r = n
e.q = c
k.o = d
k.t = e
k.r = c
assert l.q.o.v.t.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.v: F = None
        self.x: C = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.w: A = None
        self.r: C = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

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

d = A("d")
c = B("c")
n = C("n")
l = D("l")
e = E("e")
k = F("k")

d.y = c
d.o = c
d.u = n
d.x = n
d.v = k
c.r = n
c.u = n
c.z = d
c.t = k
n.t = k
n.v = k
n.r = l
n.x = c
l.y = d
l.o = d
l.q = k
e.z = d
e.w = d
e.t = d
e.p = k
e.r = n
e.q = c
k.o = d
k.t = e
k.r = c
assert l.q.o.v.t.p.t.txt == "e"