class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.y: B = None
        self.w: H = None
        self.o: C = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.o: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.o: E = None
        self.y: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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