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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.r: B = None
        self.x: H = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.v: C = None
        self.w: G = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.r: B = None
        self.y: E = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.v: E = None
        self.z: D = None
        self.s: A = None
        self.q: D = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

c = A("c")
h = B("h")
g = C("g")
m = D("m")
f = E("f")
j = F("j")
k = G("k")
b = H("b")
i = D("i")

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: G = None
        self.r: B = None
        self.x: H = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.v: C = None
        self.w: G = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.r: B = None
        self.y: E = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.v: E = None
        self.z: D = None
        self.s: A = None
        self.q: D = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

c = A("c")
h = B("h")
g = C("g")
m = D("m")
f = E("f")
j = F("j")
k = G("k")
b = H("b")
i = D("i")

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