class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.o: H = None
        self.w: H = None
        self.r: G = None
        self.t: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.q: A = None
        self.y: G = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.r: H = None
        self.q: E = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.q: A = None
        self.y: G = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.r: H = None
        self.q: E = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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