class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: E = None
        self.v: B = None
        self.z: H = None
        self.s: D = None
        self.o: D = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.x: E = None
        self.o: G = None
        self.t: B = None
        self.q: H = None
        self.y: B = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: I = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: E = None
        self.txt = txt

l = A("l")
m = B("m")
d = C("d")
e = D("e")
c = E("c")
n = F("n")
h = G("h")
a = H("a")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.x: E = None
        self.o: G = None
        self.t: B = None
        self.q: H = None
        self.y: B = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: I = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: E = None
        self.txt = txt

l = A("l")
m = B("m")
d = C("d")
e = D("e")
c = E("c")
n = F("n")
h = G("h")
a = H("a")
j = I("j")

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