class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.o: F = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.s: C = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.t: G = None
        self.x: F = None
        self.u: A = None
        self.s: G = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.z: D = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

l = A("l")
n = B("n")
f = C("f")
d = D("d")
j = E("j")
h = F("h")
b = G("b")
a = H("a")
k = G("k")
m = H("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.s: C = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.t: G = None
        self.x: F = None
        self.u: A = None
        self.s: G = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: E = None
        self.z: D = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

l = A("l")
n = B("n")
f = C("f")
d = D("d")
j = E("j")
h = F("h")
b = G("b")
a = H("a")
k = G("k")
m = H("m")

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