class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: F = None
        self.x: D = None
        self.y: C = None
        self.u: B = None
        self.o: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.s: F = None
        self.r: F = None
        self.z: F = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.s: F = None
        self.r: F = None
        self.z: F = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

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