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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.u: E = None
        self.x: F = None
        self.q: F = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

i = A("i")
h = B("h")
g = C("g")
f = D("f")
e = E("e")
d = F("d")
l = G("l")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.u: E = None
        self.x: F = None
        self.q: F = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

i = A("i")
h = B("h")
g = C("g")
f = D("f")
e = E("e")
d = F("d")
l = G("l")
c = B("c")

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