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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.u: A = None
        self.z: D = None
        self.x: E = None
        self.r: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.t: C = None
        self.v: H = None
        self.y: E = None
        self.x: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.u: A = None
        self.z: D = None
        self.x: E = None
        self.r: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.t: C = None
        self.v: H = None
        self.y: E = None
        self.x: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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