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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.u: C = None
        self.x: A = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

k.t = m
f.s = a
f.z = a
f.w = k
f.y = l
f.o = l
m.s = b
m.x = b
m.v = d
m.u = i
m.r = i
m.w = a
h.v = f
h.z = f
l.z = i
l.s = b
l.p = d
a.z = b
i.s = b
i.x = b
i.v = h
i.u = m
i.r = m
i.w = a
b.t = m
d.v = f
d.z = f
assert h.v.w.t.v.v.w.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.u: C = None
        self.x: A = None
        self.w: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

k.t = m
f.s = a
f.z = a
f.w = k
f.y = l
f.o = l
m.s = b
m.x = b
m.v = d
m.u = i
m.r = i
m.w = a
h.v = f
h.z = f
l.z = i
l.s = b
l.p = d
a.z = b
i.s = b
i.x = b
i.v = h
i.u = m
i.r = m
i.w = a
b.t = m
d.v = f
d.z = f
assert h.v.w.t.v.v.w.t.s.txt == "b"