class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.q: E = None
        self.w: F = None
        self.u: D = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.p: F = None
        self.u: A = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.s: H = None
        self.r: D = None
        self.o: D = None
        self.x: A = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.p: F = None
        self.u: A = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.s: H = None
        self.r: D = None
        self.o: D = None
        self.x: A = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

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

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

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