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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.v: E = None
        self.o: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

i.s = h
i.w = a
i.q = j
i.o = j
i.y = k
k.u = j
k.p = g
b.v = k
b.w = h
b.q = j
b.r = g
b.y = i
h.y = i
j.y = i
j.p = a
j.s = k
g.z = k
g.p = k
g.q = j
g.v = j
g.o = i
a.o = h
assert g.z.p.p.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.q: E = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.v: E = None
        self.o: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

i.s = h
i.w = a
i.q = j
i.o = j
i.y = k
k.u = j
k.p = g
b.v = k
b.w = h
b.q = j
b.r = g
b.y = i
h.y = i
j.y = i
j.p = a
j.s = k
g.z = k
g.p = k
g.q = j
g.v = j
g.o = i
a.o = h
assert g.z.p.p.p.v.txt == "j"