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

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

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

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

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

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

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

d.w = i
d.t = l
l.t = d
l.r = k
a.s = j
a.u = i
h.z = i
h.y = j
j.o = a
j.u = i
i.q = d
i.t = a
g.s = j
g.u = i
m.z = i
m.y = j
f.z = i
f.y = j
k.w = i
k.t = l
assert d.w.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

d.w = i
d.t = l
l.t = d
l.r = k
a.s = j
a.u = i
h.z = i
h.y = j
j.o = a
j.u = i
i.q = d
i.t = a
g.s = j
g.u = i
m.z = i
m.y = j
f.z = i
f.y = j
k.w = i
k.t = l
assert d.w.t.u.txt == "i"