class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.w: G = None
        self.q: B = None
        self.o: H = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.u: E = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: H = None
        self.q: B = None
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.u: E = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: H = None
        self.q: B = None
        self.z: C = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.t: D = None
        self.txt = txt

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

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

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