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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.p: E = None
        self.y: A = None
        self.q: D = None
        self.v: G = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.p: E = None
        self.y: A = None
        self.q: D = None
        self.v: G = None
        self.u: A = None
        self.s: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.txt = txt

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

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