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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

f = A("f")
m = B("m")
b = C("b")
k = D("k")
h = E("h")
c = F("c")
l = G("l")
j = H("j")
e = D("e")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: G = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: E = None
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

f = A("f")
m = B("m")
b = C("b")
k = D("k")
h = E("h")
c = F("c")
l = G("l")
j = H("j")
e = D("e")

f.v = k
f.z = h
f.x = h
f.u = j
f.w = b
m.r = h
m.o = h
m.t = l
b.p = e
b.y = e
b.u = m
b.t = m
b.w = k
b.x = f
k.y = c
k.t = c
k.u = h
k.p = b
h.u = b
h.p = m
h.x = f
h.t = l
c.o = m
c.s = e
l.s = m
l.w = f
j.r = c
e.y = c
e.t = c
e.u = h
e.p = b
assert f.v.y.s.txt == "e"