class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.txt = txt

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

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