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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.q: C = None
        self.v: B = None
        self.s: H = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

f = A("f")
g = B("g")
k = C("k")
m = D("m")
a = E("a")
b = F("b")
n = G("n")
e = H("e")
c = C("c")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.q: C = None
        self.v: B = None
        self.s: H = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

f = A("f")
g = B("g")
k = C("k")
m = D("m")
a = E("a")
b = F("b")
n = G("n")
e = H("e")
c = C("c")

f.y = a
f.t = g
f.p = m
g.w = a
g.y = m
k.u = g
k.v = g
k.y = a
k.q = c
k.s = e
k.r = f
m.y = k
m.r = k
m.t = g
m.o = b
m.v = n
m.u = n
a.p = e
a.x = e
b.t = f
b.q = a
b.v = e
n.p = m
e.x = f
e.r = m
e.w = m
e.s = n
e.p = a
e.q = a
e.o = a
c.u = g
c.v = g
c.y = a
c.q = k
c.s = e
c.r = f
assert e.w.t.y.t.y.t.y.txt == "m"