class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: I = None
        self.u: J = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: H = None
        self.v: G = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.q: J = None
        self.r: C = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

k = A("k")
i = B("i")
j = C("j")
m = D("m")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
n = I("n")
g = J("g")

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: H = None
        self.v: G = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.q: J = None
        self.r: C = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

k = A("k")
i = B("i")
j = C("j")
m = D("m")
e = E("e")
f = F("f")
b = G("b")
c = H("c")
n = I("n")
g = J("g")

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