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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.y: E = None
        self.o: C = None
        self.x: F = None
        self.w: C = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.s: G = None
        self.w: C = None
        self.v: A = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.s: C = None
        self.t: E = None
        self.x: B = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.y: E = None
        self.o: C = None
        self.x: F = None
        self.w: C = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.s: G = None
        self.w: C = None
        self.v: A = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.s: C = None
        self.t: E = None
        self.x: B = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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