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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: I = None
        self.v: D = None
        self.q: F = None
        self.r: A = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.r: A = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.v: A = None
        self.w: G = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.q: D = None
        self.s: E = None
        self.w: A = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: I = None
        self.v: D = None
        self.q: F = None
        self.r: A = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.r: A = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: I = None
        self.v: A = None
        self.w: G = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.q: D = None
        self.s: E = None
        self.w: A = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

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

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

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