class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: H = None
        self.y: D = None
        self.s: G = None
        self.r: A = None
        self.x: B = None
        self.v: D = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.z: A = None
        self.u: D = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.v: A = None
        self.p: D = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.z: A = None
        self.u: D = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.v: A = None
        self.p: D = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

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

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