class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.x: I = None
        self.p: J = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.w: I = None
        self.t: J = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.p: A = None
        self.y: B = None
        self.z: C = None
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.s: B = None
        self.x: E = None
        self.w: I = None
        self.v: E = None
        self.u: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.w: I = None
        self.t: J = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.p: A = None
        self.y: B = None
        self.z: C = None
        self.r: F = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.s: B = None
        self.x: E = None
        self.w: I = None
        self.v: E = None
        self.u: I = None
        self.txt = txt

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

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