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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.o: B = None
        self.z: G = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.s: B = None
        self.p: D = None
        self.z: G = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.w: A = None
        self.r: D = None
        self.u: B = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.o: B = None
        self.z: G = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.s: B = None
        self.p: D = None
        self.z: G = None
        self.y: H = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.w: A = None
        self.r: D = None
        self.u: B = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

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