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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.y: E = None
        self.v: A = None
        self.s: E = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: E = None
        self.y: E = None
        self.v: A = None
        self.s: E = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

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

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

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