class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.p: G = None
        self.s: C = None
        self.r: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.o: A = None
        self.z: H = None
        self.y: C = None
        self.p: C = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.p: G = None
        self.s: C = None
        self.r: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.o: A = None
        self.z: H = None
        self.y: C = None
        self.p: C = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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