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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: A = None
        self.z: H = None
        self.u: G = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.x: E = None
        self.o: C = None
        self.r: D = None
        self.v: D = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.o: C = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: A = None
        self.z: H = None
        self.u: G = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.x: E = None
        self.o: C = None
        self.r: D = None
        self.v: D = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.o: C = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

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

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

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