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

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

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

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

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

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

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

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

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

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

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

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

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

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

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