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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: B = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: B = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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