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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.p: H = None
        self.o: B = None
        self.y: H = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: I = None
        self.t: B = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.u: A = None
        self.o: G = None
        self.y: A = None
        self.q: C = None
        self.s: H = None
        self.x: F = None
        self.txt = txt

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

a.u = f
a.w = f
a.t = n
j.v = e
m.r = e
m.t = k
m.p = d
m.y = d
m.o = j
m.w = a
m.q = f
f.w = i
k.s = d
i.s = m
i.x = a
i.q = d
i.w = f
i.p = j
i.o = k
n.p = m
d.s = j
d.t = j
d.p = j
d.w = e
d.o = n
e.r = d
e.s = d
e.p = m
e.q = m
e.u = a
e.y = a
e.o = n
e.x = i
h.w = i
assert e.q.r.q.q.w.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.p: H = None
        self.o: B = None
        self.y: H = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: I = None
        self.t: B = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.u: A = None
        self.o: G = None
        self.y: A = None
        self.q: C = None
        self.s: H = None
        self.x: F = None
        self.txt = txt

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

a.u = f
a.w = f
a.t = n
j.v = e
m.r = e
m.t = k
m.p = d
m.y = d
m.o = j
m.w = a
m.q = f
f.w = i
k.s = d
i.s = m
i.x = a
i.q = d
i.w = f
i.p = j
i.o = k
n.p = m
d.s = j
d.t = j
d.p = j
d.w = e
d.o = n
e.r = d
e.s = d
e.p = m
e.q = m
e.u = a
e.y = a
e.o = n
e.x = i
h.w = i
assert e.q.r.q.q.w.q.txt == "d"