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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.o: G = None
        self.y: C = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

g = A("g")
i = B("i")
m = C("m")
j = D("j")
f = E("f")
n = F("n")
c = G("c")
l = D("l")
h = A("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.o: G = None
        self.y: C = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

g = A("g")
i = B("i")
m = C("m")
j = D("j")
f = E("f")
n = F("n")
c = G("c")
l = D("l")
h = A("h")

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