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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.x: G = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

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

k = A("k")
m = B("m")
b = C("b")
i = D("i")
e = E("e")
a = F("a")
h = G("h")
l = H("l")

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.x: G = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

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

k = A("k")
m = B("m")
b = C("b")
i = D("i")
e = E("e")
a = F("a")
h = G("h")
l = H("l")

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