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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.w: C = None
        self.t: D = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.w: C = None
        self.t: D = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.p: C = None
        self.w: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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