class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.v: G = None
        self.p: I = None
        self.w: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.p: G = None
        self.t: C = None
        self.r: I = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.s: E = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: H = None
        self.v: G = None
        self.p: I = None
        self.w: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.p: G = None
        self.t: C = None
        self.r: I = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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

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