class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.s: E = None
        self.z: D = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.p: F = None
        self.y: G = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: E = None
        self.z: G = None
        self.v: F = None
        self.y: H = None
        self.p: E = None
        self.q: I = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: G = None
        self.q: G = None
        self.z: A = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

b = A("b")
g = B("g")
e = C("e")
d = D("d")
a = E("a")
l = F("l")
c = G("c")
h = H("h")
i = I("i")
n = G("n")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.p: F = None
        self.y: G = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: E = None
        self.z: G = None
        self.v: F = None
        self.y: H = None
        self.p: E = None
        self.q: I = None
        self.w: G = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: G = None
        self.q: G = None
        self.z: A = None
        self.r: A = None
        self.s: D = None
        self.txt = txt

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

b = A("b")
g = B("g")
e = C("e")
d = D("d")
a = E("a")
l = F("l")
c = G("c")
h = H("h")
i = I("i")
n = G("n")

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