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

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

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

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

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

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

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

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

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

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

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

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

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

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

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