class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: E = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.z: H = None
        self.t: D = None
        self.p: F = None
        self.u: E = None
        self.v: G = None
        self.w: H = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: E = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.z: H = None
        self.t: D = None
        self.p: F = None
        self.u: E = None
        self.v: G = None
        self.w: H = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

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

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