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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.p: B = None
        self.txt = txt

j = A("j")
a = B("a")
f = C("f")
l = D("l")
d = E("d")
h = F("h")

j.z = l
j.t = l
j.v = l
j.s = f
j.q = a
a.w = d
a.p = d
a.y = f
a.r = l
f.v = h
l.p = a
l.u = a
l.v = f
l.x = f
l.s = d
l.y = d
d.p = f
d.t = f
d.u = l
d.z = h
h.q = d
h.v = d
h.p = a
assert a.r.y.z.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: D = None
        self.v: D = None
        self.s: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.p: B = None
        self.txt = txt

j = A("j")
a = B("a")
f = C("f")
l = D("l")
d = E("d")
h = F("h")

j.z = l
j.t = l
j.v = l
j.s = f
j.q = a
a.w = d
a.p = d
a.y = f
a.r = l
f.v = h
l.p = a
l.u = a
l.v = f
l.x = f
l.s = d
l.y = d
d.p = f
d.t = f
d.u = l
d.z = h
h.q = d
h.v = d
h.p = a
assert a.r.y.z.v.z.txt == "h"