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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.p: F = None
        self.x: F = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.x: G = None
        self.r: G = None
        self.p: G = None
        self.t: F = None
        self.u: F = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.y: C = None
        self.w: I = None
        self.q: E = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: E = None
        self.p: I = None
        self.s: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.z: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

d = A("d")
k = B("k")
g = C("g")
e = D("e")
l = E("l")
j = F("j")
h = G("h")
b = H("b")
m = I("m")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: F = None
        self.p: F = None
        self.x: F = None
        self.o: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.x: G = None
        self.r: G = None
        self.p: G = None
        self.t: F = None
        self.u: F = None
        self.w: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: C = None
        self.y: C = None
        self.w: I = None
        self.q: E = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: E = None
        self.p: I = None
        self.s: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.z: E = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

d = A("d")
k = B("k")
g = C("g")
e = D("e")
l = E("l")
j = F("j")
h = G("h")
b = H("b")
m = I("m")

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