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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

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

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

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