class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: H = None
        self.y: C = None
        self.q: B = None
        self.x: J = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.x: J = None
        self.w: G = None
        self.t: D = None
        self.q: F = None
        self.z: A = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.r: J = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: J = None
        self.y: G = None
        self.v: D = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.x: J = None
        self.w: G = None
        self.t: D = None
        self.q: F = None
        self.z: A = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.r: J = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: J = None
        self.y: G = None
        self.v: D = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

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