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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.y: H = None
        self.x: G = None
        self.q: G = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: F = None
        self.r: E = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.y: C = None
        self.x: H = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.y: H = None
        self.x: G = None
        self.q: G = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: F = None
        self.r: E = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.y: C = None
        self.x: H = None
        self.o: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.txt = txt

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

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