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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: I = None
        self.u: J = None
        self.y: I = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.r: D = None
        self.p: E = None
        self.u: I = None
        self.s: D = None
        self.o: C = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: I = None
        self.u: J = None
        self.y: I = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.r: D = None
        self.p: E = None
        self.u: I = None
        self.s: D = None
        self.o: C = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

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

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