class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: D = None
        self.s: H = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.o: E = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.q: J = None
        self.w: A = None
        self.r: J = None
        self.x: F = None
        self.s: H = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: I = None
        self.p: I = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.v: F = None
        self.y: J = None
        self.z: B = None
        self.s: E = None
        self.t: A = None
        self.x: A = None
        self.u: I = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.t: G = None
        self.o: B = None
        self.u: A = None
        self.q: J = None
        self.p: B = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.o: H = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.o: E = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.q: J = None
        self.w: A = None
        self.r: J = None
        self.x: F = None
        self.s: H = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: I = None
        self.p: I = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.v: F = None
        self.y: J = None
        self.z: B = None
        self.s: E = None
        self.t: A = None
        self.x: A = None
        self.u: I = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.t: G = None
        self.o: B = None
        self.u: A = None
        self.q: J = None
        self.p: B = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.o: H = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

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

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