class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.o: C = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.s: G = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.z: C = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: I = None
        self.r: A = None
        self.y: D = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.s: G = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.z: C = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: I = None
        self.r: A = None
        self.y: D = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

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

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

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