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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: H = None
        self.v: G = None
        self.p: B = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.v: E = None
        self.t: B = None
        self.z: I = None
        self.p: C = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.y: B = None
        self.s: G = None
        self.q: I = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: H = None
        self.v: G = None
        self.p: B = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.v: E = None
        self.t: B = None
        self.z: I = None
        self.p: C = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.y: B = None
        self.s: G = None
        self.q: I = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.txt = txt

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

g.p = h
g.o = h
g.u = h
g.v = i
e.y = i
e.o = b
b.u = m
b.r = d
b.v = i
b.p = e
b.q = e
b.t = j
j.o = m
j.r = d
j.v = f
j.s = f
j.y = f
j.t = e
j.z = k
j.p = b
f.s = e
h.q = i
h.z = i
h.r = g
h.y = g
h.v = d
h.p = d
h.x = b
i.p = g
i.u = f
i.r = e
i.v = b
d.t = m
d.q = m
d.r = k
d.y = e
d.z = e
d.s = i
k.q = j
k.o = g
m.q = j
m.o = g
assert g.o.p.s.u.s.y.u.s.txt == "e"