class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.v: D = None
        self.q: D = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

h = A("h")
l = B("l")
i = C("i")
d = D("d")
a = E("a")
m = F("m")
b = A("b")
n = B("n")
e = F("e")
j = D("j")

h.r = j
h.u = l
l.p = a
l.y = j
l.u = j
l.t = i
l.v = n
i.s = j
i.w = j
i.v = e
d.y = i
a.r = h
a.s = h
a.o = l
a.z = i
m.r = l
m.s = n
m.v = d
m.q = j
m.p = b
m.w = i
b.r = d
b.u = n
n.p = a
n.y = j
n.u = j
n.t = i
n.v = l
e.r = l
e.s = l
e.v = d
e.q = j
e.p = b
e.w = i
j.y = i
assert l.t.v.q.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.v: D = None
        self.q: D = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

h = A("h")
l = B("l")
i = C("i")
d = D("d")
a = E("a")
m = F("m")
b = A("b")
n = B("n")
e = F("e")
j = D("j")

h.r = j
h.u = l
l.p = a
l.y = j
l.u = j
l.t = i
l.v = n
i.s = j
i.w = j
i.v = e
d.y = i
a.r = h
a.s = h
a.o = l
a.z = i
m.r = l
m.s = n
m.v = d
m.q = j
m.p = b
m.w = i
b.r = d
b.u = n
n.p = a
n.y = j
n.u = j
n.t = i
n.v = l
e.r = l
e.s = l
e.v = d
e.q = j
e.p = b
e.w = i
j.y = i
assert l.t.v.q.y.s.txt == "j"