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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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