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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: J = None
        self.r: G = None
        self.o: E = None
        self.q: G = None
        self.y: C = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.t: D = None
        self.o: E = None
        self.r: D = None
        self.y: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.z: D = None
        self.x: G = None
        self.r: B = None
        self.w: G = None
        self.p: D = None
        self.u: F = None
        self.txt = txt

d = A("d")
m = B("m")
k = C("k")
i = D("i")
g = E("g")
h = F("h")
n = G("n")
b = H("b")
c = I("c")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: J = None
        self.r: G = None
        self.o: E = None
        self.q: G = None
        self.y: C = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.t: D = None
        self.o: E = None
        self.r: D = None
        self.y: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.z: D = None
        self.x: G = None
        self.r: B = None
        self.w: G = None
        self.p: D = None
        self.u: F = None
        self.txt = txt

d = A("d")
m = B("m")
k = C("k")
i = D("i")
g = E("g")
h = F("h")
n = G("n")
b = H("b")
c = I("c")
a = J("a")

d.p = m
d.r = h
d.w = c
d.t = n
m.y = c
k.s = d
k.u = g
k.q = h
i.v = a
i.s = a
i.r = n
i.q = n
i.o = g
i.y = k
i.p = m
i.w = c
g.z = c
g.p = i
g.x = k
h.t = i
n.s = d
n.q = m
b.u = n
b.z = k
b.t = i
b.r = i
b.o = g
b.y = h
c.q = g
c.r = i
a.y = m
a.r = m
a.v = c
a.z = i
a.p = i
a.x = n
a.w = n
a.u = h
assert c.q.x.u.txt == "g"