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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.s: A = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
c = D("c")
g = E("g")
i = F("i")
h = G("h")
l = H("l")
a = I("a")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: F = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.s: A = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
c = D("c")
g = E("g")
i = F("i")
h = G("h")
l = H("l")
a = I("a")
j = I("j")

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