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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.q: C = None
        self.t: A = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.q: C = None
        self.t: A = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: A = None
        self.u: F = None
        self.p: E = None
        self.txt = txt

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

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

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