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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.q: G = None
        self.p: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: D = None
        self.q: G = None
        self.p: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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