class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.o: B = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.z: H = None
        self.r: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.u: A = None
        self.y: G = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.x: E = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: D = None
        self.z: H = None
        self.r: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.u: A = None
        self.y: G = None
        self.r: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.x: E = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

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

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

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