class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.w: D = None
        self.p: B = None
        self.u: B = None
        self.s: F = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: A = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.x: D = None
        self.t: F = None
        self.y: E = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: A = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.x: D = None
        self.t: F = None
        self.y: E = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

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