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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.o: J = None
        self.p: D = None
        self.v: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.u: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: E = None
        self.o: J = None
        self.p: D = None
        self.v: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.u: J = None
        self.txt = txt

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

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

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