class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.u: I = None
        self.r: D = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.u: I = None
        self.r: D = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: E = None
        self.w: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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