class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: B = None
        self.v: A = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

f.s = j
a.u = j
a.z = f
m.t = l
m.v = l
b.p = a
b.o = a
b.t = f
b.q = l
b.v = h
h.p = b
h.o = j
h.v = f
h.s = l
h.r = l
l.p = m
l.z = h
l.q = h
l.o = f
l.y = f
j.u = a
j.z = f
assert j.u.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: B = None
        self.v: A = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

f.s = j
a.u = j
a.z = f
m.t = l
m.v = l
b.p = a
b.o = a
b.t = f
b.q = l
b.v = h
h.p = b
h.o = j
h.v = f
h.s = l
h.r = l
l.p = m
l.z = h
l.q = h
l.o = f
l.y = f
j.u = a
j.z = f
assert j.u.u.z.txt == "f"