class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.y: B = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.t: G = None
        self.z: G = None
        self.r: C = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

i = A("i")
h = B("h")
f = C("f")
a = D("a")
m = E("m")
c = F("c")
e = G("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.t: G = None
        self.z: G = None
        self.r: C = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.t: C = None
        self.txt = txt

i = A("i")
h = B("h")
f = C("f")
a = D("a")
m = E("m")
c = F("c")
e = G("e")

i.s = c
i.w = a
i.y = h
i.u = m
i.t = e
h.o = c
h.u = f
f.r = m
f.v = c
f.o = a
a.q = c
a.r = i
m.u = f
m.x = c
m.s = a
c.q = m
c.y = m
c.w = f
c.r = f
c.s = f
c.t = e
c.z = e
e.z = c
e.o = f
e.t = f
assert f.v.y.s.r.txt == "i"