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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: J = None
        self.z: E = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.o: I = None
        self.v: J = None
        self.q: H = None
        self.s: I = None
        self.t: F = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.o: F = None
        self.u: C = None
        self.t: J = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.q: A = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.s: F = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: J = None
        self.z: E = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: A = None
        self.o: I = None
        self.v: J = None
        self.q: H = None
        self.s: I = None
        self.t: F = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.o: F = None
        self.u: C = None
        self.t: J = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.q: A = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: B = None
        self.y: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: A = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: B = None
        self.s: F = None
        self.p: C = None
        self.txt = txt

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

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