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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: B = None
        self.y: H = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: I = None
        self.w: E = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.r: F = None
        self.q: D = None
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: B = None
        self.y: H = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: I = None
        self.w: E = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: G = None
        self.r: F = None
        self.q: D = None
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

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