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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.w: A = None
        self.r: G = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.w: A = None
        self.r: G = None
        self.o: F = None
        self.txt = txt

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

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