class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: H = None
        self.v: F = None
        self.t: D = None
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.v: B = None
        self.u: G = None
        self.s: F = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.s: I = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
i = D("i")
c = E("c")
j = F("j")
l = G("l")
m = H("m")
k = I("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.v: B = None
        self.u: G = None
        self.s: F = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.s: I = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
i = D("i")
c = E("c")
j = F("j")
l = G("l")
m = H("m")
k = I("k")

e.o = m
e.p = m
e.v = j
e.t = i
e.x = l
d.t = j
d.z = j
d.o = j
d.y = k
d.q = i
g.s = c
g.r = c
g.u = c
g.o = l
g.q = d
g.z = j
g.v = k
g.y = e
i.p = j
i.s = j
i.q = j
i.w = l
i.u = l
i.v = d
i.t = e
c.x = d
j.s = i
j.r = g
j.p = l
l.p = d
l.r = e
l.s = k
l.w = j
m.u = c
m.s = c
m.v = l
m.q = l
m.o = d
k.v = g
assert j.p.w.r.y.o.o.txt == "d"