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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.y: F = None
        self.p: E = None
        self.v: D = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: H = None
        self.v: F = None
        self.p: E = None
        self.q: H = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: E = None
        self.p: G = None
        self.txt = txt

h = A("h")
c = B("c")
l = C("l")
g = D("g")
j = E("j")
i = F("i")
a = G("a")
e = H("e")
b = D("b")
f = F("f")

h.u = g
h.x = g
h.o = j
c.t = l
c.y = e
c.w = a
c.r = a
c.o = a
l.p = i
g.t = h
g.w = c
g.x = c
g.y = i
g.p = j
g.v = b
g.u = a
j.s = f
j.r = c
i.r = j
i.p = j
i.t = e
i.q = e
i.v = f
i.o = l
i.w = l
a.y = f
a.v = b
a.w = i
a.s = i
a.p = j
a.t = c
e.q = i
e.v = j
e.p = a
b.t = h
b.w = c
b.x = c
b.y = f
b.p = j
b.v = g
b.u = a
f.r = j
f.p = j
f.t = e
f.q = e
f.v = i
f.o = l
f.w = l
assert i.q.p.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.y: F = None
        self.p: E = None
        self.v: D = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: H = None
        self.v: F = None
        self.p: E = None
        self.q: H = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: E = None
        self.p: G = None
        self.txt = txt

h = A("h")
c = B("c")
l = C("l")
g = D("g")
j = E("j")
i = F("i")
a = G("a")
e = H("e")
b = D("b")
f = F("f")

h.u = g
h.x = g
h.o = j
c.t = l
c.y = e
c.w = a
c.r = a
c.o = a
l.p = i
g.t = h
g.w = c
g.x = c
g.y = i
g.p = j
g.v = b
g.u = a
j.s = f
j.r = c
i.r = j
i.p = j
i.t = e
i.q = e
i.v = f
i.o = l
i.w = l
a.y = f
a.v = b
a.w = i
a.s = i
a.p = j
a.t = c
e.q = i
e.v = j
e.p = a
b.t = h
b.w = c
b.x = c
b.y = f
b.p = j
b.v = g
b.u = a
f.r = j
f.p = j
f.t = e
f.q = e
f.v = i
f.o = l
f.w = l
assert i.q.p.t.y.txt == "e"