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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.w: I = None
        self.r: G = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: I = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.z: A = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

d.v = e
d.q = e
l.p = a
l.v = d
b.t = h
b.v = n
a.x = l
a.p = g
a.w = n
a.r = f
a.t = d
a.u = b
h.o = e
g.p = d
g.r = d
g.o = e
f.u = d
f.x = n
f.o = b
e.o = h
e.p = d
e.t = n
e.w = a
n.u = e
n.s = e
n.q = a
n.z = d
n.x = h
assert e.w.t.v.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: F = None
        self.w: I = None
        self.r: G = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.t: I = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.z: A = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

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