class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: C = None
        self.s: F = None
        self.u: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

h.w = l
h.x = j
h.s = a
h.u = d
h.z = n
d.z = n
j.r = h
j.z = l
j.t = n
j.o = c
j.y = c
n.y = d
n.v = l
l.o = j
c.y = a
c.p = d
c.t = b
b.w = l
b.x = j
b.s = a
b.u = d
b.z = n
a.y = c
a.p = d
a.t = b
assert h.z.y.z.y.z.v.o.txt == "j"