class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.p: H = None
        self.z: G = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.w: E = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.p: H = None
        self.z: G = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.w: E = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: H = None
        self.q: H = None
        self.z: F = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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