class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: F = None
        self.x: D = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.t: G = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

i = A("i")
b = B("b")
k = C("k")
a = D("a")
l = E("l")
c = F("c")
g = G("g")

i.w = c
i.r = c
i.t = c
i.x = a
i.y = g
b.o = c
b.z = k
b.x = g
k.w = a
k.s = a
k.u = c
k.q = c
k.t = g
a.u = b
a.z = g
l.q = a
l.w = a
l.t = a
l.p = i
l.u = i
l.r = g
c.u = a
c.o = a
c.z = k
c.p = l
c.q = g
g.w = l
g.o = l
g.y = i
g.v = i
g.u = k
g.q = a
g.s = b
assert g.q.u.z.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: F = None
        self.x: D = None
        self.y: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: F = None
        self.t: G = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

i = A("i")
b = B("b")
k = C("k")
a = D("a")
l = E("l")
c = F("c")
g = G("g")

i.w = c
i.r = c
i.t = c
i.x = a
i.y = g
b.o = c
b.z = k
b.x = g
k.w = a
k.s = a
k.u = c
k.q = c
k.t = g
a.u = b
a.z = g
l.q = a
l.w = a
l.t = a
l.p = i
l.u = i
l.r = g
c.u = a
c.o = a
c.z = k
c.p = l
c.q = g
g.w = l
g.o = l
g.y = i
g.v = i
g.u = k
g.q = a
g.s = b
assert g.q.u.z.s.z.txt == "g"