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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.txt = txt

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

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

d.t = n
d.z = h
d.q = k
d.v = j
d.p = c
h.w = n
h.p = d
j.x = h
j.t = h
j.y = h
j.w = d
c.s = h
c.r = d
c.z = l
n.w = i
n.y = h
k.s = j
k.w = j
k.y = d
i.s = h
i.r = d
i.z = l
l.s = j
l.w = j
l.y = d
assert k.s.w.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.q: F = None
        self.v: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.txt = txt

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

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

d.t = n
d.z = h
d.q = k
d.v = j
d.p = c
h.w = n
h.p = d
j.x = h
j.t = h
j.y = h
j.w = d
c.s = h
c.r = d
c.z = l
n.w = i
n.y = h
k.s = j
k.w = j
k.y = d
i.s = h
i.r = d
i.z = l
l.s = j
l.w = j
l.y = d
assert k.s.w.v.t.txt == "h"