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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: A = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.txt = txt

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

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