class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.x: F = None
        self.p: D = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.t: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: G = None
        self.t: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

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

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

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