class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.txt = txt

e = A("e")
k = B("k")
l = C("l")
j = D("j")
d = D("d")
f = A("f")
n = A("n")

e.t = l
e.v = l
e.s = f
e.r = f
k.w = l
k.x = l
l.t = n
l.w = d
l.p = d
l.r = j
j.q = l
j.p = l
d.q = l
d.p = l
f.t = l
f.v = l
f.s = n
f.r = e
n.t = l
n.v = l
n.s = f
n.r = e
assert f.s.v.p.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.txt = txt

e = A("e")
k = B("k")
l = C("l")
j = D("j")
d = D("d")
f = A("f")
n = A("n")

e.t = l
e.v = l
e.s = f
e.r = f
k.w = l
k.x = l
l.t = n
l.w = d
l.p = d
l.r = j
j.q = l
j.p = l
d.q = l
d.p = l
f.t = l
f.v = l
f.s = n
f.r = e
n.t = l
n.v = l
n.s = f
n.r = e
assert f.s.v.p.p.r.txt == "j"