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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.o: A = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
e = B("e")
n = C("n")
f = D("f")
j = E("j")
l = F("l")

b.z = f
b.w = j
e.x = l
n.s = b
n.p = l
n.z = l
n.t = j
n.y = e
f.y = l
f.w = l
f.q = j
f.v = b
j.s = b
j.o = b
j.w = b
j.q = b
j.v = e
l.t = e
assert f.q.v.x.t.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.o: A = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
e = B("e")
n = C("n")
f = D("f")
j = E("j")
l = F("l")

b.z = f
b.w = j
e.x = l
n.s = b
n.p = l
n.z = l
n.t = j
n.y = e
f.y = l
f.w = l
f.q = j
f.v = b
j.s = b
j.o = b
j.w = b
j.q = b
j.v = e
l.t = e
assert f.q.v.x.t.x.t.txt == "e"