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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.r: F = None
        self.u: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: B = None
        self.t: B = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

k = A("k")
n = B("n")
f = C("f")
g = D("g")
d = E("d")
b = F("b")
m = G("m")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.r: F = None
        self.u: E = None
        self.v: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: B = None
        self.t: B = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

k = A("k")
n = B("n")
f = C("f")
g = D("g")
d = E("d")
b = F("b")
m = G("m")
j = C("j")

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