class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: E = None
        self.p: G = None
        self.q: G = None
        self.w: I = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.u: C = None
        self.s: F = None
        self.t: E = None
        self.q: G = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.s: G = None
        self.o: C = None
        self.u: D = None
        self.x: A = None
        self.z: D = None
        self.r: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.u: C = None
        self.s: F = None
        self.t: E = None
        self.q: G = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.s: G = None
        self.o: C = None
        self.u: D = None
        self.x: A = None
        self.z: D = None
        self.r: J = None
        self.txt = txt

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

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

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