class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.o: C = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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