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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.u: A = None
        self.s: G = None
        self.y: I = None
        self.q: J = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.z: A = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.w: B = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.u: A = None
        self.s: G = None
        self.y: I = None
        self.q: J = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: I = None
        self.v: A = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.z: A = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: E = None
        self.w: B = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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