class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.u: E = None
        self.z: A = None
        self.s: G = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: F = None
        self.o: A = None
        self.u: E = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: E = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

h = A("h")
m = B("m")
a = C("a")
k = D("k")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
l = I("l")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: E = None
        self.u: E = None
        self.z: A = None
        self.s: G = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: F = None
        self.o: A = None
        self.u: E = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: E = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

h = A("h")
m = B("m")
a = C("a")
k = D("k")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
l = I("l")
n = J("n")

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