class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.u: C = None
        self.x: A = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: B = None
        self.x: E = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

k = A("k")
m = B("m")
i = C("i")
a = D("a")
h = E("h")
g = F("g")
e = G("e")
j = D("j")
n = G("n")
b = F("b")

k.y = b
k.r = n
m.r = b
m.w = a
m.u = i
m.s = i
m.x = k
m.p = h
i.s = a
i.p = k
i.t = e
i.u = n
i.o = m
a.p = h
h.r = m
h.p = b
g.p = a
g.w = a
g.o = m
g.x = h
g.r = i
e.v = i
j.p = h
n.v = i
b.p = j
b.w = j
b.o = m
b.x = h
b.r = i
assert g.r.t.v.t.v.o.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.u: C = None
        self.x: A = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: B = None
        self.x: E = None
        self.r: C = None
        self.w: D = None
        self.txt = txt

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

k = A("k")
m = B("m")
i = C("i")
a = D("a")
h = E("h")
g = F("g")
e = G("e")
j = D("j")
n = G("n")
b = F("b")

k.y = b
k.r = n
m.r = b
m.w = a
m.u = i
m.s = i
m.x = k
m.p = h
i.s = a
i.p = k
i.t = e
i.u = n
i.o = m
a.p = h
h.r = m
h.p = b
g.p = a
g.w = a
g.o = m
g.x = h
g.r = i
e.v = i
j.p = h
n.v = i
b.p = j
b.w = j
b.o = m
b.x = h
b.r = i
assert g.r.t.v.t.v.o.x.y.txt == "b"