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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.x: C = None
        self.y: B = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

h = A("h")
i = B("i")
a = C("a")
j = D("j")
e = E("e")
k = F("k")

h.p = j
h.r = j
h.s = j
h.w = k
i.v = j
a.p = i
a.t = k
a.y = k
j.x = a
j.v = a
j.y = k
e.z = a
e.o = a
e.y = k
e.u = h
e.q = j
e.v = i
k.o = a
k.q = a
k.x = a
k.y = i
k.z = j
k.t = h
assert i.v.v.p.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.x: C = None
        self.y: B = None
        self.z: D = None
        self.t: A = None
        self.txt = txt

h = A("h")
i = B("i")
a = C("a")
j = D("j")
e = E("e")
k = F("k")

h.p = j
h.r = j
h.s = j
h.w = k
i.v = j
a.p = i
a.t = k
a.y = k
j.x = a
j.v = a
j.y = k
e.z = a
e.o = a
e.y = k
e.u = h
e.q = j
e.v = i
k.o = a
k.q = a
k.x = a
k.y = i
k.z = j
k.t = h
assert i.v.v.p.v.y.txt == "k"