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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.y: B = None
        self.s: B = None
        self.x: G = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.y: B = None
        self.s: B = None
        self.x: G = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

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