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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: A = None
        self.u: A = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.z: C = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
d = D("d")
c = E("c")
h = F("h")
g = G("g")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: A = None
        self.u: A = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.z: C = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

b = A("b")
e = B("e")
l = C("l")
d = D("d")
c = E("c")
h = F("h")
g = G("g")

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